package cn.com.lms.business.livecourse.persistence.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * CourseLive
 *
 * @author barry
 * @date 2020/3/16
 **/

@Data
@Entity
@Table(name = "bnz_course_live", schema = "bnzj")
public class CourseLive {

    @Schema(description = "直播信息记录id")
    private long id;
    @Schema(description = "直播课程id")
    private long courseInfoId;
    @Schema(description = "直播流名称")
    private String streamName;
    @Schema(description = "推流链接rmtp")
    private String pushUrl;
    @Schema(description = "播流链接rmtp")
    private String pullUrl;
    @Schema(description = "播流链接flv")
    private String pullUrlFlv;
    @Schema(description = "播流链接m3u8")
    private String pullUrlM3u8;
    @Schema(description = "直播流状态：0未使用；1直播中；2已结束；3录制完成")
    private int status;
    @Schema(description = "点播视频id")
    private String vid;
    @Schema(description = "创建时间")
    private Timestamp createTime;
    @Schema(description = "过期时间")
    private Timestamp expireTime;
    @Schema(description = "最后一次状态更新时间")
    private Timestamp lastStatusUpdateTime;
    @Schema(description = "聊天室房间群组id(腾讯云)")
    private String chatRoomGroupId;
    @Schema(description = "创建人名称")
    private String creatorName;
    @Schema(description = "课程简介")
    private String remark;
    @Schema(description = "课程时长（单位分钟）")
    private Integer courseTime;
    @Schema(description = "课程播放链接")
    private String courseFile;

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "course_info_id")
    public long getCourseInfoId() {
        return courseInfoId;
    }

    public void setCourseInfoId(long courseInfoId) {
        this.courseInfoId = courseInfoId;
    }

    @Basic
    @Column(name = "stream_name")
    public String getStreamName() {
        return streamName;
    }

    public void setStreamName(String streamName) {
        this.streamName = streamName;
    }

    @Basic
    @Column(name = "push_url")
    public String getPushUrl() {
        return pushUrl;
    }

    public void setPushUrl(String pushUrl) {
        this.pushUrl = pushUrl;
    }

    @Basic
    @Column(name = "pull_url")
    public String getPullUrl() {
        return pullUrl;
    }

    public void setPullUrl(String pullUrl) {
        this.pullUrl = pullUrl;
    }

    @Basic
    @Column(name = "pull_url_flv")
    public String getPullUrlFlv() {
        return pullUrlFlv;
    }

    public void setPullUrlFlv(String pullUrlFlv) {
        this.pullUrlFlv = pullUrlFlv;
    }

    @Basic
    @Column(name = "pull_url_m3u8")
    public String getPullUrlM3u8() {
        return pullUrlM3u8;
    }

    public void setPullUrlM3u8(String pullUrlM3u8) {
        this.pullUrlM3u8 = pullUrlM3u8;
    }

    @Basic
    @Column(name = "status")
    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Basic
    @Column(name = "vid")
    public String getVid() {
        return vid;
    }

    public void setVid(String vid) {
        this.vid = vid;
    }

    @Basic
    @Column(name = "create_time")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "expire_time")
    public Timestamp getExpireTime() {
        return expireTime;
    }

    public void setExpireTime(Timestamp expireTime) {
        this.expireTime = expireTime;
    }

    @Basic
    @Column(name = "last_status_update_time")
    public Timestamp getLastStatusUpdateTime() {
        return lastStatusUpdateTime;
    }

    public void setLastStatusUpdateTime(Timestamp lastStatusUpdateTime) {
        this.lastStatusUpdateTime = lastStatusUpdateTime;
    }

    @Transient
    public String getChatRoomGroupId() {
        return chatRoomGroupId;
    }

    public void setChatRoomGroupId(String chatRoomGroupId) {
        this.chatRoomGroupId = chatRoomGroupId;
    }

    @Transient
    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    @Transient
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Transient
    public Integer getCourseTime() {
        return courseTime;
    }

    public void setCourseTime(Integer courseTime) {
        this.courseTime = courseTime;
    }

    @Transient
    public String getCourseFile() {
        return courseFile;
    }

    public void setCourseFile(String courseFile) {
        this.courseFile = courseFile;
    }
}
